<?php
/***************************************************************
*  Copyright notice
*  (c) 2009, jianyuzhu@gmail.com
*  All rights reserved
*  This script is part of the PPEMI project.
***************************************************************/

//
include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'lib.json.class.php');

//
if( $action == 'check' ) {
	include_once(CONFIG_PATH . CONFIG_DIR_CLASSES . 'module/product/product.class.php');
	$mObj = new ProductBase();
	$mObj->format = true;
	$mObj->filter_fields = array('link:=', 'id:=', 'id:!=');
	
	$link = trim(strtolower(util_get_param($_REQUEST, 'link')));
	$key = trim(strtolower(util_get_param($_REQUEST, 'key')));
	
	$items = $mObj->getItemsTotal(array('link:=' => $link));
	de($items);
	$ds = array('status' => 0);
	echo JsonUtil::encode($ds);
	exit();
}
//
?>